import 'react-native-gesture-handler';
import React from 'react'
import Home from './components/Home'
import Login from './components/Login'
import Info from './components/Info'
import Person from './components/Person'
import Main from './components/Main'
import UserPage from './components/userPage/UserPage'
import Communication from './components/otherPage/Communication'
import {View, Text,Button,StatusBar} from 'react-native'
import {NavigationContainer} from '@react-navigation/native'
import {createStackNavigator} from  '@react-navigation/stack'
import RootStore from './mobx/index'
import {Provider} from 'mobx-react'
//创建路由导航栈
const Stack = createStackNavigator();
function App () {
  return( 
    // 包裹整个项目
      <Provider RootStore={RootStore}>
        <NavigationContainer>
                          {/* 初始化页面           隐藏标题   */}
          <Stack.Navigator initialRouteName="Main" headerMode="none">
            {/* 屏幕导航 */}
            <Stack.Screen name="Home" component={Home}/>
            <Stack.Screen name="Main" component={Main}/>
            <Stack.Screen name="Login" component={Login}/>
            <Stack.Screen name="Info" component={Info}/>
            <Stack.Screen name="Person" component={Person}/>
            <Stack.Screen name="UserPage" component={UserPage}/>
            <Stack.Screen name="Communication" component={Communication}/>
          </Stack.Navigator>
        </NavigationContainer>
      </Provider>
  )
}
export default App